Skip to content

src: allow custom headers - #1

Merged
lance merged 1 commit into
lance:refactor-apifrom
lholmquist:custom-headers
Jun 17, 2020
Merged

lance merged 1 commit into
lance:refactor-apifrom
lholmquist:custom-headers

Conversation

@lholmquist

Copy link
Copy Markdown

This adds a test and also the ability to send a customer header to the Emitter.send method

I had to add this, https://github.com/lance/sdk-javascript/compare/refactor-api...lholmquist:custom-headers?expand=1#diff-cd195927075bff5495d70edbbf239548R21, because the "options.headers"
were getting overwritten by during the merge

Signed-off-by: Lucas Holmquist lholmqui@redhat.com

Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
@lance
lance merged commit 46d5832 into lance:refactor-api Jun 17, 2020
lance pushed a commit that referenced this pull request Jun 19, 2020
Signed-off-by: Lucas Holmquist <lholmqui@redhat.com>
lance added a commit that referenced this pull request Jun 24, 2020
This is a major rewrite of the entire codebase into TypeScript. Nearly
all tests have been retained except where behavior is significantly
different. Some highlights of these changes:

* lowercase all CloudEvent properties and fix base64 encoded data

Previously there was a format() function that would convert a CloudEvent
object into JSON with all of the properties lowercased. With this rewrite
a CloudEvent object can be converted to JSON simply with JSON.stringify().

However, in order to be compliant with the JSON representation outlined in
the spec here https://github.com/cloudevents/spec/blob/v1.0/json-format.md
all of the event properties must be all lowercase.

* lib(transport): make transport mode an Enum
* src: allow custom headers (#1)
* lib(exports): export explicitly versioned names where appropriate
* lib(cloudevent): modify ctor to accept extensions inline
* lib(cloudevent): make extensions a part of the event object
* test: convert all tests to typescript
* examples: update all examples with latest API changes
* docs: update README with latest API changes
* src: add prettier for code style and fix a lot of linting errors
* lib: move data decoding to occur within the CloudEvent object

Signed-off-by: Lance Ball <lball@redhat.com>
lance added a commit that referenced this pull request Jul 1, 2020
This is a major rewrite of the entire codebase into TypeScript. Nearly
all tests have been retained except where behavior is significantly
different. Some highlights of these changes:

* lowercase all CloudEvent properties and fix base64 encoded data

Previously there was a format() function that would convert a CloudEvent
object into JSON with all of the properties lowercased. With this rewrite
a CloudEvent object can be converted to JSON simply with JSON.stringify().

However, in order to be compliant with the JSON representation outlined in
the spec here https://github.com/cloudevents/spec/blob/v1.0/json-format.md
all of the event properties must be all lowercase.

* lib(transport): make transport mode an Enum
* src: allow custom headers (#1)
* lib(exports): export explicitly versioned names where appropriate
* lib(cloudevent): modify ctor to accept extensions inline
* lib(cloudevent): make extensions a part of the event object
* test: convert all tests to typescript
* examples: update all examples with latest API changes
* docs: update README with latest API changes
* src: add prettier for code style and fix a lot of linting errors
* lib: move data decoding to occur within the CloudEvent object

Signed-off-by: Lance Ball <lball@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants